package service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import dao.PersonDao;
import po.Person;
import service.PersonDaoManager;
@Service(value="personDaoManager")
public class PersonDaoManagerImpl implements PersonDaoManager {
	@Autowired
	@Qualifier(value="personDao")
	private PersonDao personDao;
	
	@Override
	@Transactional
	public Person addPerson(Person person) {
		return personDao.addPerson(person);
	}

	@Override
	@Transactional
	public int deletePerson(String id) {
		return personDao.deletePerson(id);
	}

	@Override
	@Transactional
	public Person updatePerson(Person person) {
		return personDao.updatePerson(person);
	}

	@Override
	@Transactional
	public List<Person> findAllPerson() {
		return personDao.findAllPerson();
	}

}
